-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: Narrow down type of method keyword in Index #52723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@phofl @noatamir @jorisvandenbossche @MarcoGorelli PyData workshop |
Any suggestions on how to proceed with |
Didn't see that mypy failed:
You might be able to change the signature of |
Yep you can change the signature as well |
@phofl @twoertwein The mypy/typing problem seems to be resolved, yet one unit tests is failing. Could it be that it's flaky? I haven't been able to deduce much from the error message. |
Thank you @kklein ! |
* Add literal type hint. * Move type variable to _typing.py. * Use existing type alias. * EOF
* Add literal type hint. * Move type variable to _typing.py. * Use existing type alias. * EOF
This PR narrows down the type of the
method
keyword, used in two methods of the classIndex
to exactly the permitted values via the use ofLiteral
.doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.